import httpInstance from '@/axios/index.js'

// 登录接口
export const login = (username, password) => {
  return httpInstance({
    method:"post",
    url:"/admin/login",
    // post请求体参数
    data: {
      username,
      password
    }
  })
}

// 获取当前用户信息接口
export const getinfo = () => {
  return httpInstance.post('/admin/getinfo')
}

// 退出登录接口
export const logout = () =>{
  return httpInstance.post('/admin/logout')
}

// 修改密码接口
export const updatepassword = (data) =>{
  return httpInstance.post('/admin/updatepassword',data)
}